package com.example.sms.employee.service.impl;

import com.example.sms.employee.dao.EmployeeMapper;
import com.example.sms.employee.service.IDeleteEmployeeCommandHandler;
import com.example.sms.employee.service.api.DeleteEmployeeCommand;
import com.google.common.eventbus.Subscribe;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmployeeService implements IDeleteEmployeeCommandHandler {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public EmployeeMapper getEmployeeMapper() {
        return this.employeeMapper;
    }

    @Subscribe
    public void process(DeleteEmployeeCommand command) {
        IDeleteEmployeeCommandHandler.super.process(command);
    }
}
